<?php
namespace app\api\validate;

use think\Validate;

class Expense extends Validate
{

    /**
     * 验证规则
     */
    protected $rule = [
        'date'                          => 'require',
        'details'                       => 'require|array',
    ];

    /**
     * 提示消息
     */
    protected $message = [
        'date.require'                   => '开支日期不能为空',
        'details.require'                => '开支明细不能为空',
        'details.array'                  => '开支明细必须是数组',
    ];

    /**
     * 字段描述
     */
    protected $field = [

    ];

    /**
     * 验证场景
     */
    protected $scene = [
        'clock'  => ['date','details'],
    ];

}
